package com.cloud.ethan.configserverclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author daifei
 * @date 2019/5/8
 */
@RestController
@RefreshScope
public class TestController {

    @Value("${config.server.name}")
    private String serverName;

    @GetMapping("config")
    public String test() {
        return serverName;
    }
}
